#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'

int n, m;
void solve() {
  vector<int> a(n + 1);
  rep(i, 1, n) cin >> a[i];
  sort(a.begin() + 1, a.begin() + n + 1);
  rep(i, 1, m) {
    int x;
    cin >> x;
    int y = lower_bound(a.begin() + 1, a.begin() + n + 1, x) - a.begin();
    if (y > n || a[y] != x)
      cout << x << " not found" << endl;
    else
      cout << x << " found at " << y << endl;
  }
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int id = 0;
  while (cin >> n >> m && n != 0 && m != 0) {
    ++id;
    cout << "CASE# " << id << ':' << endl;
    solve();
  }
  return 0;
}